<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var name = '小王',
            age = 17;
        var obj = {
            name: '小张',
            objAge: this.age,
            myFun: function () {
                console.log(this.name + '年龄：' + this.age)
            }
        }
        var db = {
            name: '小马',
            age: 99
        }
        console.log(obj.objAge)
        obj.myFun() // 小张年龄 undefined

        obj.myFun.call(db)
        obj.myFun.apply(db)
        obj.myFun.bind(db)();
    </script>
</body>

</html>